Fix encoding detection

--- ./src/Services/Encoding.vala.orig	2013-11-30 09:18:29.000000000 +0000
+++ ./src/Services/Encoding.vala	2014-02-11 19:23:37.000000000 +0000
@@ -260,7 +260,7 @@
     public static string get_charset (string path) {
         // Get correct encoding via chardect.py script
 
-        const string FALLBACK_CHARSET = "UTF-8";
+        const string FALLBACK_CHARSET = "ISO-8859-1";
         string script = Constants.SCRIPTDIR + "/chardetect.py";
         string command = "python " + script + " \"" + path.replace ("\\ ", " ") + "\"";
         string? charset = null;
@@ -284,10 +284,12 @@
         string? encoding = null;
         string? encoded_content = null;
         
-        encoding = get_charset (file.get_path ());
-        
         try {
-            encoded_content = GLib.convert (content, -1, "UTF-8", encoding);
+            encoded_content = content.locale_to_utf8 (-1, null, null, null);
+            if ( encoded_content == null ) {
+                encoding = get_charset (file.get_path ());
+                encoded_content = GLib.convert (content, -1, "UTF-8", encoding);
+            }
         } catch (GLib.ConvertError ce) {
             warning (ce.message);
         }
